<template>
    <div class="base-set bg-light">
      <div class="container-title">活动信息
        <Button type="primary" @click="jumpPrevPage">修改促销</Button>
      </div>
        <div class="info-list">
          <Row class-name="setRow-padding">
            <Col span="8">
              <span>活动名称：</span>{{$store.state.moreSale.MoresaleForm.name}}
            </Col>
            <Col span="8">
              <span>使用期限：</span>{{$store.state.moreSale.MoresaleForm.date[0] | dateTime}} - {{$store.state.moreSale.MoresaleForm.date[1] | dateTime}}
            </Col>
            <Col span="8">
              <span>参与方式：</span>{{gender}}
            </Col>
          </Row>
          <Row class-name="setRow-padding">
            <Col span="8">
              <span>促销类型：</span>{{type}}
            </Col>
            <Col span="8">
              <div class="flexalign-center" v-show="$store.state.moreSale.MoresaleForm.type == '1'">
                <span class="selfalign-center">活动规则：</span>
                <ul><li v-show="$store.state.moreSale.MoresaleForm.main" >满{{$store.state.moreSale.MoresaleForm.main}}件减{{$store.state.moreSale.MoresaleForm.second}}件</li></ul>
              </div>
              <div class="flexalign-center" v-show="$store.state.moreSale.MoresaleForm.type == '2'">
                <span class="selfalign-center">活动规则：</span>
                <ul><li v-show="item.value" v-for="(item,index) in $store.state.moreSale.MoresaleForm.type2" :key="index">满{{item.value}}</li></ul>
                <ul><li v-show="item.value" v-for="(item,index) in $store.state.moreSale.MoresaleForm.type1" :key="index">件打{{item.value}}折</li></ul>
              </div>
            </Col>
            <Col span="8">
              <span>活动对象：</span>{{grade}}
            </Col>
          </Row>
          <Row class-name="setRow-padding">
            <Col span="8">
              <span>活动备注：</span>{{$store.state.moreSale.MoresaleForm.remarks}}
            </Col>
          </Row>
        </div>
    </div>
</template>
<script>
export default {
  name: '',
  methods: {
    jumpPrevPage () {
      this.$router.back();
    }
  },
  computed: {
    grade () {
      return this.$store.getters.moreSaleGrade;
    },
    gender () {
      return this.$store.getters.moreSaleGender;
    },
    type () {
      return this.$store.getters.moreSaleType;
    }
  },
  data () {
    return {
      buttonSize: 'large'
    }
  }
}
</script>

